@page
@using My.ExcelToData.Permissions
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.AspNetCore.Mvc.UI.Layout
@using My.ExcelToData.Web.Pages.ExcelDatas.ExcelData
@using My.ExcelToData.Localization
@using My.ExcelToData.Web.Menus
@model IndexModel
@inject IPageLayout PageLayout
@inject IHtmlLocalizer<ExcelToDataResource> L
@inject IAuthorizationService Authorization
@{
    PageLayout.Content.Title = L["ExcelData"].Value;
    PageLayout.Content.BreadCrumb.Add(L["Menu:ExcelData"].Value);
    PageLayout.Content.MenuItemName = ExcelToDataMenus.ExcelData;
}

@section scripts
{
    <abp-script src="/Pages/ExcelDatas/ExcelData/index.js" />
}
@section styles
{
    <abp-style src="/Pages/ExcelDatas/ExcelData/index.css"/>
}

<abp-card>
    <abp-card-header>
        <abp-row>
            <abp-column size-md="_6">
                <abp-card-title>@L["ExcelData"]</abp-card-title>
            </abp-column>
            <abp-column size-md="_6" class="text-end">
			    @if (await Authorization.IsGrantedAsync(ExcelToDataPermissions.ExcelData.Create))
                {
                <abp-button id="NewExcelDataButton"
                            text="@L["CreateExcelData"].Value"
                            icon="plus"
                            button-type="Primary" />
                }
            </abp-column>
        </abp-row>
    </abp-card-header>
    <abp-card-body>
        <abp-row class="mb-3">
            <a abp-collapse-id="ExcelDataCollapse" class="text-secondary">@L["TableFilter"] </a>
        </abp-row>
        <abp-dynamic-form abp-model="ExcelDataFilter" id="ExcelDataFilter" required-symbols="false" column-size="_3">
            <abp-collapse-body id="ExcelDataCollapse">
                <abp-form-content />
            </abp-collapse-body>
        </abp-dynamic-form>
        <hr />
        <abp-table striped-rows="true" id="ExcelDataTable" class="nowrap"/>
    </abp-card-body>
</abp-card>
